package a.f.h.b;

import a.c.bb;
import a.c.d;
import a.c.*;
import a.c.v;
import a.c.x;
import a.c.y;
import a.c.z;
import a.d.s;
import a.f.*;
import a.f.j.cb;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;

import a.d.s;
import a.f.j.cb;

public class e
  implements a.f.j.db
{
  public static final Object a = "EDGE_LABEL_REF";
  private static final double b = 5.0D;
  private static final int c = 0;
  private static final int d = 1;
  private static final int e = 2;
  private static final int f = 3;
  private static final int g = 4;
  protected f h;
  protected cb i;
  protected a.f.o j;
  protected a.c.n k;
  protected x l;
  protected xb m;
  protected a.c.n n;
  protected boolean o = false;
  protected int p;
  protected yb q;
  protected List r = new ArrayList();
  public static int s;
  
  public void a(cb paramcb, a.c.k paramk, int paramInt)
  {
    int i2 = f.m;
    boolean bool = f.l;
    this.i = paramcb;
    this.p = paramInt;
    this.j = ((a.f.o)paramcb.a());
    this.k = this.j.C();
    this.l = this.j.B();
    this.m = null;
    this.j.a(a, this.l);
    m localm = this.j.w();
    label217:
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      ArrayList localArrayList;
      do
      {
        kc[] arrayOfkc = (kc[])paramk.get(locald);
        if (bool) {
          return;
        }
        if (arrayOfkc == null) {
          break label278;
        }
        localArrayList = new ArrayList(arrayOfkc.length);
        int i1 = 0;
        do
        {
          if (i1 >= arrayOfkc.length) {
            break;
          }
          localArrayList.add(arrayOfkc[i1]);
          i1++;
          if ((i2 == 0) && (bool)) {
            break label217;
          }
        } while (!bool);
        this.r.addAll(localArrayList);
        l.a(localArrayList, new b_());
      } while (i2 != 0);
      this.k.a(locald, localArrayList);
      if ((i2 != 0) || (this.m == null))
      {
        wb[] arrayOfwb = this.j.g(locald);
        if (i2 != 0) {
          continue;
        }
        if (arrayOfwb != null)
        {
          if (i2 != 0) {
            continue;
          }
          if (arrayOfwb.length > 0)
          {
            wb localwb = arrayOfwb[0];
            this.m = localwb.a();
          }
        }
      }
      localm.f();
    } while (!bool);
    label278:
    paramcb.a(this);
    if (i2 == 0) {
      this.q = new yb();
    }
  }
  
  public void a(a.c.n paramn)
  {
    this.n = paramn;
  }
  
  public void a(f paramf)
  {
    this.h = paramf;
  }
  
  public void a()
  {
    this.j.j(a);
    this.j.a(this.k);
    this.j.a(this.l);
    this.i.b(this);
  }
  
  public void b()
  {
    int i3 = f.m;
    boolean bool = f.l;
    this.o = true;
    d[] arrayOfd = this.j.u();
    int i1 = 0;
    do
    {
      if (i1 >= arrayOfd.length) {
        break;
      }
      d locald = arrayOfd[i1];
      if (i3 != 0) {
        break label130;
      }
      if (bool) {
        break label129;
      }
      if (i3 == 0)
      {
        if (!this.i.h(locald))
        {
          ArrayList localArrayList = (ArrayList)this.k.get(locald);
          if ((i3 != 0) || (localArrayList != null))
          {
            int i2 = localArrayList.size();
            if (i2 != 0) {
              this.h.g(locald, i2);
            }
          }
        }
        i1++;
      }
    } while (!bool);
    if (i3 == 0) {
      label129:
      label130:
      this.o = false;
    }
  }
  
  private static a.d.t a(a.d.t paramt, a.d.w paramw)
  {
    a.d.t localt = new a.d.t(paramt.d() - 5.0D, paramt.e() - 5.0D, paramt.b() + 10.0D, paramt.c() + 10.0D);
    double d1 = Math.min(localt.d(), paramw.a());
    double d2 = Math.min(localt.e(), paramw.b());
    double d3 = Math.max(localt.d() + localt.b(), paramw.a());
    double d4 = Math.max(localt.e() + localt.c(), paramw.b());
    return new a.d.t(d1, d2, d3 - d1, d4 - d2);
  }
  
  public void a(a.f.h.d.t paramt)
  {
    int i3 = f.m;
    boolean bool = f.l;
    bb localbb1 = new bb();
    bb localbb2 = new bb();
    z localz1 = new z();
    x localx1 = a.i.db.a();
    x localx2 = a.i.db.a();
    Object localObject1 = this.j.v();
    Object localObject4;
    Object localObject5;
    label156:
    do
    {
      do
      {
        if (!((a.c.w)localObject1).e()) {
          break;
        }
        localObject2 = ((a.c.w)localObject1).d();
        localObject3 = paramt.a(this.j, (a.c.e)localObject2);
        localObject4 = ((z)localObject3).h();
        do
        {
          if (!((y)localObject4).e()) {
            break label156;
          }
          a.d.t localt1 = (a.d.t)((y)localObject4).j();
          localObject5 = localz1.b(localt1);
          localx1.a(localObject2, localObject5);
          ((y)localObject4).f();
          if ((i3 == 0) && (bool)) {
            break;
          }
        } while (!bool);
        localObject4 = b((a.c.e)localObject2);
      } while (i3 != 0);
      if (i3 == 0)
      {
        if (localObject4 != null)
        {
          if (i3 == 0) {
            if (this.h.i(((a.c.e)localObject2).h()).e())
            {
              localbb2.add(localObject2);
              localx2.a(localObject2, this.j.p((a.c.e)localObject2));
              if (i3 != 0) {
                continue;
              }
              if (!bool) {
                break label262;
              }
            }
          }
          localbb1.add(localObject2);
          localx2.a(localObject2, this.j.q((a.c.e)localObject2));
        }
        ((a.c.w)localObject1).f();
      }
    } while (!bool);
    label262:
    localObject1 = new a_(localx2, false);
    localbb2.a((Comparator)localObject1);
    Object localObject2 = localbb2.l();
    int i1;
    d locald;
    Object localObject6;
    Object localObject7;
    double d1;
    a.d.t localt3;
    a.d.t localt4;
    Object localObject8;
    double d3;
    Object localObject9;
    a.d.t localt5;
    label1020:
    do
    {
      do
      {
        if (!((a.c.w)localObject2).e()) {
          break;
        }
        localObject3 = ((a.c.w)localObject2).d();
        localObject4 = b((a.c.e)localObject3);
        i1 = ((kc)localObject4).g().a();
        if (bool) {
          break label1056;
        }
        localObject5 = this.h.d(((a.c.e)localObject3).h()) ? ((a.c.e)localObject3).j() : ((a.c.e)localObject3).h();
        locald = this.h.d(((a.c.e)localObject3).h()) ? ((a.c.e)localObject3).h() : ((a.c.e)localObject3).j();
        if (i3 == 0) {
          if (i1 == 1)
          {
            if ((i3 == 0) && (!this.h.f((d)localObject5).equals(">"))) {
              break label1020;
            }
            localObject6 = (v)localx1.get(localObject3);
            localObject7 = (a.d.t)localz1.h((v)localObject6);
            d1 = this.j.p(locald.f()) + this.j.s(locald.f());
            localt3 = a((a.d.t)localObject7, this.j.r((d)localObject5));
            localt4 = new a.d.t(d1, localt3.e(), localt3.d() + localt3.b() - d1, localt3.c());
            localObject8 = a(localt4, localz1);
            d3 = d1;
            y localy1 = ((z)localObject8).h();
            do
            {
              if (!localy1.e()) {
                break;
              }
              localObject9 = (a.d.t)localy1.j();
              d3 = Math.max(d3, ((a.d.t)localObject9).d() + ((a.d.t)localObject9).b());
              localy1.f();
              if (i3 != 0) {
                break label1029;
              }
              if (bool) {
                break label1027;
              }
            } while (!bool);
            double d5 = d3 + 5.0D;
            d5 = Math.min(d5, ((a.d.t)localObject7).d());
            localt5 = new a.d.t(d5, ((a.d.t)localObject7).e(), ((a.d.t)localObject7).b(), ((a.d.t)localObject7).c());
            localObject6 = localz1.b(localt5);
            localx1.a(localObject3, localObject6);
            this.j.b((a.c.e)localObject3, localt5.f());
            if (i3 != 0) {
              continue;
            }
          }
        }
        if (((i3 != 0) || (bool)) && ((i3 != 0) || (i1 == 2))) {
          if ((i3 != 0) || (this.h.f((d)localObject5).equals("<")))
          {
            localObject6 = (v)localx1.get(localObject3);
            localObject7 = (a.d.t)localz1.h((v)localObject6);
            d1 = this.j.p(((d)localObject5).f()) + this.j.s(((d)localObject5).f());
            localt3 = a((a.d.t)localObject7, this.j.r((d)localObject5));
            localt4 = new a.d.t(d1, localt3.e(), localt3.d() + localt3.b() - d1, localt3.c());
            localObject8 = a(localt4, localz1);
            d3 = d1;
            y localy2 = ((z)localObject8).h();
            do
            {
              if (!localy2.e()) {
                break;
              }
              localObject9 = (a.d.t)localy2.j();
              d3 = Math.max(d3, ((a.d.t)localObject9).d() + ((a.d.t)localObject9).b());
              localy2.f();
              if (i3 != 0) {
                break label1029;
              }
              if (bool) {
                break label1027;
              }
            } while (!bool);
            double d6 = d3 + 5.0D;
            d6 = Math.min(d6, ((a.d.t)localObject7).d());
            localt5 = new a.d.t(d6, ((a.d.t)localObject7).e(), ((a.d.t)localObject7).b(), ((a.d.t)localObject7).c());
            localObject6 = localz1.b(localt5);
            localx1.a(localObject3, localObject6);
            if (i3 != 0) {
              break label1763;
            }
            this.j.b((a.c.e)localObject3, localt5.f());
          }
        }
        ((a.c.w)localObject2).f();
      } while (!bool);
      localbb1.a((Comparator)localObject1);
    } while (i3 != 0);
    label1027:
    label1029:
    localObject2 = localbb1.l();
    label1056:
    label1763:
    label1766:
    label1773:
    label1775:
    do
    {
      if (!((a.c.w)localObject2).e()) {
        break;
      }
      localObject3 = ((a.c.w)localObject2).d();
      localObject4 = b((a.c.e)localObject3);
      i1 = ((kc)localObject4).g().a();
      localObject5 = this.h.d(((a.c.e)localObject3).h()) ? ((a.c.e)localObject3).j() : ((a.c.e)localObject3).h();
      locald = this.h.d(((a.c.e)localObject3).h()) ? ((a.c.e)localObject3).h() : ((a.c.e)localObject3).j();
      if (i3 == 0) {
        if (i1 == 1)
        {
          if ((i3 == 0) && (!this.h.f((d)localObject5).equals("_"))) {
            break label1766;
          }
          localObject6 = (v)localx1.get(localObject3);
          localObject7 = (a.d.t)localz1.h((v)localObject6);
          d1 = this.j.q(locald.f()) + this.j.t(locald.f());
          localt3 = a((a.d.t)localObject7, this.j.r((d)localObject5));
          localt4 = new a.d.t(localt3.d(), d1, localt3.b(), localt3.e() + localt3.c() - d1);
          localObject8 = a(localt4, localz1);
          d3 = d1;
          y localy3 = ((z)localObject8).h();
          do
          {
            if (!localy3.e()) {
              break;
            }
            localObject9 = (a.d.t)localy3.j();
            d3 = Math.max(d3, ((a.d.t)localObject9).e() + ((a.d.t)localObject9).c());
            localy3.f();
            if (i3 != 0) {
              break label1775;
            }
            if (bool) {
              break label1773;
            }
          } while (!bool);
          double d7 = d3 + 5.0D;
          d7 = Math.min(d7, ((a.d.t)localObject7).e());
          localt5 = new a.d.t(((a.d.t)localObject7).d(), d7, ((a.d.t)localObject7).b(), ((a.d.t)localObject7).c());
          localObject6 = localz1.b(localt5);
          localx1.a(localObject3, localObject6);
        }
      }
      do
      {
        this.j.b((a.c.e)localObject3, localt5.f());
        if (i3 != 0) {
          break label1775;
        }
        if (((i3 == 0) && (!bool)) || ((i3 == 0) && (i1 != 2))) {
          break;
        }
        if ((i3 == 0) && (!this.h.f((d)localObject5).equals("^"))) {
          break;
        }
        localObject6 = (v)localx1.get(localObject3);
        localObject7 = (a.d.t)localz1.h((v)localObject6);
        d1 = this.j.q(((d)localObject5).f()) + this.j.t(((d)localObject5).f());
        localt3 = a((a.d.t)localObject7, this.j.r((d)localObject5));
        localt4 = new a.d.t(localt3.d(), d1, localt3.b(), localt3.e() + localt3.c() - d1);
        localObject8 = a(localt4, localz1);
        d3 = d1;
        y localy4 = ((z)localObject8).h();
        do
        {
          if (!localy4.e()) {
            break;
          }
          localObject9 = (a.d.t)localy4.j();
          d3 = Math.max(d3, ((a.d.t)localObject9).e() + ((a.d.t)localObject9).c());
          localy4.f();
          if (i3 != 0) {
            break label1775;
          }
          if (bool) {
            break label1773;
          }
        } while (!bool);
        double d8 = d3 + 5.0D;
        d8 = Math.min(d8, ((a.d.t)localObject7).e());
        localt5 = new a.d.t(((a.d.t)localObject7).d(), d8, ((a.d.t)localObject7).b(), ((a.d.t)localObject7).c());
        localObject6 = localz1.b(localt5);
        localx1.a(localObject3, localObject6);
      } while (i3 != 0);
      this.j.b((a.c.e)localObject3, localt5.f());
      ((a.c.w)localObject2).f();
    } while (!bool);
    localObject2 = new a_(localx2, true);
    localbb2.a((Comparator)localObject2);
    Object localObject3 = localbb2.l();
    kc localkc;
    int i2;
    a.d.t localt2;
    double d2;
    z localz2;
    double d4;
    a.d.t localt6;
    label2492:
    label2499:
    label2501:
    do
    {
      do
      {
        if (!((a.c.w)localObject3).e()) {
          break;
        }
        localObject4 = ((a.c.w)localObject3).d();
        localkc = b((a.c.e)localObject4);
        i2 = localkc.g().a();
        if (bool) {
          break label2528;
        }
        locald = this.h.d(((a.c.e)localObject4).h()) ? ((a.c.e)localObject4).j() : ((a.c.e)localObject4).h();
        localObject6 = this.h.d(((a.c.e)localObject4).h()) ? ((a.c.e)localObject4).h() : ((a.c.e)localObject4).j();
        if (i3 == 0) {
          if (i2 == 2)
          {
            if ((i3 == 0) && (!this.h.f(locald).equals(">"))) {
              break label2492;
            }
            localObject7 = (v)localx1.get(localObject4);
            localt2 = (a.d.t)localz1.h((v)localObject7);
            d2 = this.j.p(locald.f());
            localt4 = a(localt2, this.j.r(locald));
            localObject8 = new a.d.t(localt4.d(), localt4.e(), d2 - localt4.d(), localt4.c());
            localz2 = a((a.d.t)localObject8, localz1);
            d4 = d2;
            localObject9 = localz2.h();
            do
            {
              if (!((y)localObject9).e()) {
                break;
              }
              localt5 = (a.d.t)((y)localObject9).j();
              d4 = Math.min(d4, localt5.d());
              ((y)localObject9).f();
              if (i3 != 0) {
                break label2501;
              }
              if (bool) {
                break label2499;
              }
            } while (!bool);
            double d9 = d4 - 5.0D - localt2.b();
            d9 = Math.max(d9, localt2.d());
            localt6 = new a.d.t(d9, localt2.e(), localt2.b(), localt2.c());
            localObject7 = localz1.b(localt6);
            localx1.a(localObject4, localObject7);
            this.j.b((a.c.e)localObject4, localt6.f());
            if (i3 != 0) {
              continue;
            }
          }
        }
        if (((i3 != 0) || (bool)) && ((i3 != 0) || (i2 == 1))) {
          if ((i3 != 0) || (this.h.f(locald).equals("<")))
          {
            localObject7 = (v)localx1.get(localObject4);
            localt2 = (a.d.t)localz1.h((v)localObject7);
            d2 = this.j.p(((d)localObject6).f());
            localt4 = a(localt2, this.j.r(locald));
            localObject8 = new a.d.t(localt4.d(), localt4.e(), d2 - localt4.d(), localt4.c());
            localz2 = a((a.d.t)localObject8, localz1);
            d4 = d2;
            y localy5 = localz2.h();
            do
            {
              if (!localy5.e()) {
                break;
              }
              localt5 = (a.d.t)localy5.j();
              d4 = Math.min(d4, localt5.d());
              localy5.f();
              if (i3 != 0) {
                break label2501;
              }
              if (bool) {
                break label2499;
              }
            } while (!bool);
            double d10 = d4 - 5.0D - localt2.b();
            d10 = Math.max(d10, localt2.d());
            localt6 = new a.d.t(d10, localt2.e(), localt2.b(), localt2.c());
            localObject7 = localz1.b(localt6);
            localx1.a(localObject4, localObject7);
            if (i3 != 0) {
              break label3203;
            }
            this.j.b((a.c.e)localObject4, localt6.f());
          }
        }
        ((a.c.w)localObject3).f();
      } while (!bool);
      localbb1.a((Comparator)localObject2);
    } while (i3 != 0);
    localObject3 = localbb1.l();
    label2528:
    if (((a.c.w)localObject3).e()) {}
    label3203:
    label3211:
    label3218:
    label3220:
    while (i3 != 0)
    {
      localObject4 = ((a.c.w)localObject3).d();
      localkc = b((a.c.e)localObject4);
      i2 = localkc.g().a();
      if (bool) {
        break label3244;
      }
      locald = this.h.d(((a.c.e)localObject4).h()) ? ((a.c.e)localObject4).j() : ((a.c.e)localObject4).h();
      localObject6 = this.h.d(((a.c.e)localObject4).h()) ? ((a.c.e)localObject4).h() : ((a.c.e)localObject4).j();
      if (i3 == 0) {
        if (i2 == 1)
        {
          if ((i3 == 0) && (!this.h.f(locald).equals("^"))) {
            break label3211;
          }
          localObject7 = (v)localx1.get(localObject4);
          localt2 = (a.d.t)localz1.h((v)localObject7);
          d2 = this.j.q(((d)localObject6).f());
          localt4 = a(localt2, this.j.r(locald));
          localObject8 = new a.d.t(localt4.d(), localt4.e(), localt4.b(), d2 - localt4.e());
          localz2 = a((a.d.t)localObject8, localz1);
          d4 = d2;
          y localy6 = localz2.h();
          do
          {
            if (!localy6.e()) {
              break;
            }
            localt5 = (a.d.t)localy6.j();
            d4 = Math.min(d4, localt5.e());
            localy6.f();
            if (i3 != 0) {
              break label3220;
            }
            if (bool) {
              break label3218;
            }
          } while (!bool);
          double d11 = d4 - 5.0D - localt2.c();
          d11 = Math.max(d11, localt2.e());
          localt6 = new a.d.t(localt2.d(), d11, localt2.b(), localt2.c());
          localObject7 = localz1.b(localt6);
          localx1.a(localObject4, localObject7);
        }
      }
      do
      {
        this.j.b((a.c.e)localObject4, localt6.f());
        if (i3 != 0) {
          break label3220;
        }
        if (((i3 == 0) && (!bool)) || ((i3 == 0) && (i2 != 2))) {
          break;
        }
        if ((i3 == 0) && (!this.h.f(locald).equals("_"))) {
          break;
        }
        localObject7 = (v)localx1.get(localObject4);
        localt2 = (a.d.t)localz1.h((v)localObject7);
        d2 = this.j.q(locald.f());
        localt4 = a(localt2, this.j.r(locald));
        localObject8 = new a.d.t(localt4.d(), localt4.e(), localt4.b(), d2 - localt4.e());
        localz2 = a((a.d.t)localObject8, localz1);
        d4 = d2;
        y localy7 = localz2.h();
        do
        {
          if (!localy7.e()) {
            break;
          }
          localt5 = (a.d.t)localy7.j();
          d4 = Math.min(d4, localt5.e());
          localy7.f();
          if (i3 != 0) {
            break label3220;
          }
          if (bool) {
            break label3218;
          }
        } while (!bool);
        double d12 = d4 - 5.0D - localt2.c();
        d12 = Math.max(d12, localt2.e());
        localt6 = new a.d.t(localt2.d(), d12, localt2.b(), localt2.c());
        localObject7 = localz1.b(localt6);
        localx1.a(localObject4, localObject7);
      } while (i3 != 0);
      this.j.b((a.c.e)localObject4, localt6.f());
      ((a.c.w)localObject3).f();
      if (!bool) {
        break;
      }
    }
    localObject3 = this.j.v();
    label3244:
    do
    {
      if (!((a.c.w)localObject3).e()) {
        break;
      }
      localObject4 = ((a.c.w)localObject3).d();
      localkc = b((a.c.e)localObject4);
      if (i3 == 0)
      {
        if (localkc != null)
        {
          a(localkc, (a.c.e)localObject4);
          this.h.g((a.c.e)localObject4);
        }
        ((a.c.w)localObject3).f();
      }
    } while (!bool);
  }
  
  private z a(a.d.t paramt, z paramz)
  {
    int i1 = f.m;
    boolean bool = f.l;
    z localz = new z();
    y localy = paramz.h();
    if (localy.e()) {}
    label94:
    label95:
    label104:
    while (i1 != 0)
    {
      a.d.t localt = (a.d.t)localy.j();
      if (i1 == 0) {
        if (!a.d.t.a(localt, paramt))
        {
          if (i1 != 0) {
            break label94;
          }
          if (!localt.b(paramt))
          {
            if (i1 != 0) {
              break label104;
            }
            if (!paramt.b(localt)) {
              break label95;
            }
          }
        }
      }
      localz.add(localt);
      localy.f();
      if (!bool) {
        break;
      }
    }
    return localz;
  }
  
  public void a(d paramd, d[] paramArrayOfd)
  {
    int i1 = f.m;
    if (i1 == 0) {
      if (this.o)
      {
        if (i1 != 0) {
          break label34;
        }
        d(paramd, paramArrayOfd);
        if (!f.l) {
          return;
        }
      }
    }
    label34:
    c(paramd, paramArrayOfd);
  }
  
  public void c(d paramd, d[] paramArrayOfd)
  {
    int i2 = f.m;
    boolean bool = f.l;
    ArrayList localArrayList1 = (ArrayList)this.k.get(paramd);
    if (((i2 == 0) && (localArrayList1 == null)) || ((i2 == 0) && (localArrayList1.isEmpty())) || (paramArrayOfd.length < 2)) {
      return;
    }
    ArrayList localArrayList2 = new ArrayList();
    ArrayList localArrayList3 = new ArrayList();
    ArrayList localArrayList4 = new ArrayList();
    Object localObject1 = localArrayList1.iterator();
    if (((Iterator)localObject1).hasNext()) {}
    Object localObject2;
    int i1;
    Object localObject3;
    label214:
    while (i2 != 0)
    {
      localObject2 = (kc)((Iterator)localObject1).next();
      i1 = ((kc)localObject2).g().a();
      localObject3 = ((kc)localObject2).g();
      if (i2 != 0) {
        break label225;
      }
      if (bool) {
        break label224;
      }
      if (((fd)localObject3).j())
      {
        localArrayList2.add(localObject2);
        if ((i2 == 0) && (!bool)) {
          break;
        }
      }
      if (i2 == 0)
      {
        if (!((fd)localObject3).j())
        {
          if (i2 != 0) {
            break label214;
          }
          if (!((fd)localObject3).k())
          {
            localArrayList4.add(localObject2);
            if (i2 != 0) {
              break label214;
            }
            if (!bool) {
              break;
            }
          }
        }
        localArrayList3.add(localObject2);
      }
      if (!bool) {
        break;
      }
    }
    label224:
    if (paramArrayOfd.length == 2)
    {
      label225:
      this.k.a(paramArrayOfd[0], localArrayList2);
      localArrayList3.addAll(localArrayList4);
      this.k.a(paramArrayOfd[1], localArrayList3);
      if (!bool) {}
    }
    else
    {
      localObject1 = paramArrayOfd[0];
      localObject2 = paramArrayOfd[(paramArrayOfd.length - 1)];
      i1 = (paramArrayOfd.length + 1) / 2 - 1;
      localObject3 = paramArrayOfd[i1];
      this.k.a(localObject1, localArrayList2);
      this.k.a(localObject2, localArrayList4);
      this.k.a(localObject3, localArrayList3);
    }
  }
  
  private static a.f.h.k a(double paramDouble)
  {
    a.f.h.k localk = new a.f.h.k();
    localk.a(0.0D);
    localk.b(0.0D);
    localk.c(paramDouble);
    return localk;
  }
  
  public void d(d paramd, d[] paramArrayOfd)
  {
    int i8 = f.m;
    boolean bool = f.l;
    ArrayList localArrayList = (ArrayList)this.k.get(paramd);
    tb localtb = a(paramd);
    if (((i8 != 0) || (this.n != null)) && ((i8 != 0) || (this.n.get(paramd) != null)))
    {
      a.f.h.k localk = (a.f.h.k)this.n.get(paramd);
      int i2 = 0;
      int i3 = 0;
      do
      {
        do
        {
          if (i3 >= localArrayList.size()) {
            break;
          }
          kc localkc2 = (kc)localArrayList.get(i3);
          if (bool) {
            break label210;
          }
          if ((i8 != 0) || (this.q != null)) {
            this.q.a(this.j, localkc2, localtb);
          }
          i2 += (int)Math.floor(localtb.e() ? localkc2.c() : localkc2.b());
          i3++;
        } while (!bool);
        i3 = (int)Math.ceil(Math.max(localk.a() + localk.b(), localk.c()));
      } while (i8 != 0);
      if (i3 > i2)
      {
        label210:
        int i4 = this.p * ((i3 - i2) / ((localArrayList.size() + 1) * this.p));
        int i5 = i3 - i4 * (localArrayList.size() + 1);
        int i6 = 0;
        do
        {
          if (i6 >= paramArrayOfd.length) {
            break;
          }
          if (bool) {
            break label307;
          }
          int i7 = i6 == 0 ? i4 + i5 : i4;
          this.n.a(paramArrayOfd[i6], a(i7));
          i6++;
        } while (!bool);
      }
    }
    label307:
    int i1 = 0;
    do
    {
      if (i1 >= localArrayList.size()) {
        break;
      }
      a.c.e locale = paramArrayOfd[i1].f();
      this.i.g(locale);
      kc localkc1 = (kc)localArrayList.get(i1);
      this.l.a(locale, localkc1);
      s locals = a(localkc1, paramd);
      this.j.a(locale, locals);
      i1++;
    } while (!bool);
  }
  
  private tb a(d paramd)
  {
    int i1 = f.m;
    k localk = this.h.i(paramd);
    if (i1 == 0) {
      if (k.a.c(localk)) {
        return tb.a;
      }
    }
    if (i1 == 0) {
      if (k.b.c(localk)) {
        return tb.b;
      }
    }
    if (i1 == 0) {
      if (k.c.c(localk)) {
        return tb.c;
      }
    }
    if (k.d.c(localk)) {
      return tb.d;
    }
    return null;
  }
  
  private s a(kc paramkc, d paramd)
  {
    int i1 = f.m;
    tb localtb = a(paramd);
    fd localfd = paramkc.g();
    double d1 = paramkc.b();
    double d2 = paramkc.c();
    if (!localfd.o())
    {
      if ((i1 != 0) || (localtb != tb.c))
      {
        if (i1 != 0) {
          break label85;
        }
        if (localtb != tb.a) {}
      }
      else
      {
        d1 += Math.max(0.0D, localfd.h());
        if (!f.l) {
          break label114;
        }
      }
      label85:
      if ((i1 != 0) || ((localtb == tb.d) || (localtb == tb.b))) {
        d2 += Math.max(0.0D, localfd.h());
      }
    }
    label114:
    return new s(d1, d2);
  }
  
  private void a(kc paramkc, a.c.e parame)
  {
    int i2 = f.m;
    boolean bool = f.l;
    d locald = a(parame);
    double d1 = this.j.r(locald).a();
    double d2 = this.j.r(locald).b();
    fd localfd = paramkc.g();
    int i1 = a(locald, localfd);
    double d3 = paramkc.b();
    double d4 = paramkc.c();
    double d5 = this.j.p(parame);
    double d6 = this.j.q(parame);
    double d7 = Math.max(0.0D, localfd.h());
    if (i2 == 0) {}
    switch (i1)
    {
    case 2: 
      d5 = d1 + d7;
      if (i2 == 0) {
        if (!bool) {
          break label200;
        }
      }
    case 3: 
      d5 = d1 - d7 - d3;
      if (i2 == 0) {
        if (!bool) {
          break label200;
        }
      }
    case 1: 
      if (i2 == 0)
      {
        d6 = d2 + d7;
        if (!bool) {
          break label200;
        }
      }
    case 0: 
      d6 = d2 - d7 - d4;
    }
    label200:
    a.d.w localw = new a.d.w(d5 + d3 * 0.5D, d6 + d4 * 0.5D);
    paramkc.a().b(localw);
  }
  
  private d a(a.c.e parame)
  {
    d locald = parame.i();
    if ((f.m != 0) || (this.h.d(locald))) {
      locald = this.h.a(locald);
    }
    return locald;
  }
  
  public void c()
  {
    int i1 = f.m;
    boolean bool = f.l;
    if ((i1 != 0) || (this.q != null))
    {
      Iterator localIterator = this.r.iterator();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        kc localkc = (kc)localIterator.next();
        this.q.a(this.j, localkc);
      } while (!bool);
    }
  }
  
  private int a(d paramd, fd paramfd)
  {
    int i2 = f.m;
    int i1 = paramfd.b();
    tb localtb = a(paramd);
    if (i2 == 0) {
      if (i1 != 8)
      {
        if (i2 == 0) {
          if (localtb == tb.a)
          {
            if (i2 != 0) {
              break label77;
            }
            if (i1 == 16) {
              break label76;
            }
          }
        }
        if (i2 == 0) {
          if ((localtb == tb.c) && ((i2 != 0) || (i1 == 32))) {
            label76:
            label77:
            return 3;
          }
        }
        if (i2 == 0) {
          if (localtb == tb.a)
          {
            if (i2 != 0) {
              break label127;
            }
            if (i1 == 32) {
              break label126;
            }
          }
        }
        if (i2 == 0) {
          if ((localtb == tb.c) && ((i2 != 0) || (i1 == 16))) {
            label126:
            label127:
            return 2;
          }
        }
        if (i2 == 0) {
          if (localtb == tb.d)
          {
            if (i2 != 0) {
              break label177;
            }
            if (i1 == 32) {
              break label176;
            }
          }
        }
        if (i2 == 0) {
          if ((localtb == tb.b) && ((i2 != 0) || (i1 == 16))) {
            label176:
            label177:
            return 0;
          }
        }
        if (i2 == 0) {
          if (localtb == tb.d)
          {
            if (i2 != 0) {
              break label222;
            }
            if (i1 == 16) {
              break label221;
            }
          }
        }
        if (localtb == tb.b)
        {
          if (i2 != 0) {
            break label224;
          }
          if (i1 == 32) {
            label221:
            label222:
            return 1;
          }
        }
      }
    }
    label224:
    return 4;
  }
  
  public void a(d[] paramArrayOfd, d paramd)
  {
    int i2 = f.m;
    boolean bool = f.l;
    Object localObject = null;
    int i1 = 0;
    if (i1 < paramArrayOfd.length) {}
    label84:
    label89:
    while (i2 != 0)
    {
      ArrayList localArrayList = (ArrayList)this.k.get(paramArrayOfd[i1]);
      if (bool) {
        return;
      }
      if ((i2 != 0) || (localArrayList != null))
      {
        if (i2 == 0) {
          if (localObject == null)
          {
            localObject = localArrayList;
            if (i2 != 0) {
              break label89;
            }
            if (!bool) {
              break label84;
            }
          }
        }
        localObject.addAll(localArrayList);
      }
      i1++;
      if (!bool) {
        break;
      }
    }
    this.k.a(paramd, localObject);
  }
  
  public void a(d paramd, a.f.j.n[] paramArrayOfn1, a.f.j.n[] paramArrayOfn2) {}
  
  public void b(d paramd, a.f.j.n[] paramArrayOfn1, a.f.j.n[] paramArrayOfn2) {}
  
  private kc b(a.c.e parame)
  {
    return (kc)this.l.get(parame);
  }
  
  static class b_
    implements Comparator
  {
    private static final int a = 0;
    private static final int b = 1;
    private static final int d = 2;
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      int k = f.m;
      kc localkc1 = (kc)paramObject1;
      kc localkc2 = (kc)paramObject2;
      int i = a(localkc1.g());
      int j = a(localkc2.g());
      if (k == 0)
      {
        if (i < j) {
          return -1;
        }
        if (k != 0) {}
      }
      else if (i > j)
      {
        return 1;
      }
      return 0;
    }
    
    private int a(fd paramfd)
    {
      int i = f.m;
      if (i == 0) {
        if (paramfd.j()) {
          return 0;
        }
      }
      if (i == 0) {
        if (!paramfd.j())
        {
          if (i != 0) {
            break label42;
          }
          if (!paramfd.k()) {
            return 2;
          }
        }
      }
      label42:
      return 1;
    }
  }
  
  static class a_
    implements Comparator
  {
    private x a;
    private boolean c;
    
    a_(x paramx, boolean paramBoolean)
    {
      this.a = paramx;
      this.c = paramBoolean;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      int i = f.m;
      double d1 = this.a.getDouble(paramObject1);
      double d2 = this.a.getDouble(paramObject2);
      if (i == 0) {
        if (d1 < d2)
        {
          if (i == 0) {}
          return this.c ? 1 : -1;
        }
      }
      if (i == 0) {
        if (d1 > d2)
        {
          if (i == 0) {}
          return this.c ? -1 : 1;
        }
      }
      return 0;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.h.b.e

 * JD-Core Version:    0.7.0.1

 */